<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>积分平台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/rankings.css"/>

		<script src="__INDEX__/js/lib/font.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="mui-content">
		    <div class="mui-slider">
			    <div class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
			        <a class="mui-control-item mui-active" href="#item1"><span>公司排行</span><i class="control-line"></i></a>
			        <a class="mui-control-item" href="#item2"><span>部门排行</span><i class="control-line"></i><img class="xiala" src="__INDEX__/images/xiala.png"/></a>

			    </div>
			    <!--<div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div>-->
			    <div class="mui-slider-group">
			        <div id="item1" class="mui-slider-item mui-control-content mui-active">
			        	<div id="wrapper" class="view-box">
			        		<div id="scroller">
			        			<div class="excellent">
			        			{foreach $info as $key=>$val}
									{if $key <= 2}
										{if $key=="0"}
											<div class="excellent-first" id="qiansan">
										{elseif $key=="1"}
											<div class="excellent-second">
										{else /}
											<div class="excellent-third">
										{/if}
											<div class="excellent-left mui-pull-left">
												{if $val['zan']==1}
												<img class="dianzhan checked" src="__INDEX__/images/dianzhan2-active.png"/>
												{else}
												<img class="dianzhan" data="{$val['id']}" src="__INDEX__/images/dianzhan2.png"/>
												{/if}
												<span>{$val['departmen_name']}-{$val["nickname"]}</span>
											</div>
											<div class="excellent-right mui-pull-right">
												<div class="mui-pull-left jifen">
													<img src="__INDEX__/images/jifen.png"/>
													<!-- {$key+1} -->
													<p>{$val["integral"]}分</p>
												</div>
											{if $key=="0"}
												<img class="mui-pull-left jiangbei" src="__INDEX__/images/diyi.png"/>
											{elseif $key=="1"}
												<img class="mui-pull-left jiangbei" src="__INDEX__/images/dier.png"/>
											{else /}
												<img class="mui-pull-left jiangbei" src="__INDEX__/images/disan.png"/>
											{/if}

					        			</div>
					        		</div>
									{/if}
					        	{/foreach}

					        		<!-- <div class="excellent-second">
					        			<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan checked" src="__INDEX__/images/dianzhan-active.png"/>
					        				<span>行政部-孙悟空</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen.png"/>
					        					<p>100分</p>
					        				</div>
					        				<img class="mui-pull-left jiangbei" src="__INDEX__/images/dier.png"/>
					        			</div>
					        		</div>
					        		<div class="excellent-third">
					        			<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan.png"/>
					        				<span>人事部-肖恩</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen.png"/>
					        					<p>100分</p>
					        				</div>
					        				<img class="mui-pull-left jiangbei" src="__INDEX__/images/disan.png"/>
					        			</div>
					        		</div> -->
					        	</div>
			        			<ul class="mui-table-view ">
								{foreach $info as $key=>$val}
									{if $key > 2}
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
											{if $val['zan']==1}
											<img class="dianzhan checked" src="__INDEX__/images/dianzhan2-active.png"/>
											{else}
											<img class="dianzhan" data="{$val['id']}" src="__INDEX__/images/dianzhan2.png"/>
											{/if}
											<span>{$val["departmen_name"]}-{$val["nickname"]}</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>{$val["integral"]}分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>{$key+1}</span>
					        				</div>
					        			</div>
					                </li>
									{/if}
								{/foreach}
								{foreach $one as $v}
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<!--<img class="dianzhan" data="In" src="__INDEX__/images/dianzhan2.png"/>-->
					        				<span>{$v['departmen_name']}-{$v["nickname"]}</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>{$v["integral"]}分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>{$my}</span>
					        				</div>
					        			</div>
					                </li>
					            {/foreach}
					            </ul>
					        </div>
			        	</div>
			        </div>
			<!--部门排行 start-->
			<div id="item2" class="mui-slider-item mui-control-content ">
				<div id="wrapper2" class="view-box">
					<div id="scroller2">
						<div class="excellent">
						{foreach $bumeninfo as $key=>$val}
							{if $key <= 2}
							{if $key+1=="1"}
							<div class="excellent-first dt">
								{elseif $key+1=="2"}
								<div class="excellent-second dt">
									{else /}
									<div class="excellent-third dt">
										{/if}
										<div class="excellent-left mui-pull-left">
											{if $val['zan']==1}
											<img class="dianzhan checked" src="__INDEX__/images/dianzhan2-active.png"/>
											{else}
											<img class="dianzhan" data="'.$val['id'].'" src="__INDEX__/images/dianzhan2.png"/>
											{/if}
											<span>{$val['departmen_name']}-{$val["nickname"]}</span>
										</div>
										<div class="excellent-right mui-pull-right">
											<div class="mui-pull-left jifen">
												<img src="__INDEX__/images/jifen.png"/>
												<!-- {$key+1} -->
												<p>{$val["integral"]}分</p>
											</div>
											{if $key+1=="1"}
											<img class="mui-pull-left jiangbei" src="__INDEX__/images/diyi.png"/>
											{elseif $key+1=="2"}
											<img class="mui-pull-left jiangbei" src="__INDEX__/images/dier.png"/>
											{else /}
											<img class="mui-pull-left jiangbei" src="__INDEX__/images/disan.png"/>
											{/if}

										</div>
									</div>
									{/if}
						{/foreach}

					        		<!--<div class="excellent-second">
					        			<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan-active.png"/>
					        				<span>行政部-孙悟空</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<img src="__INDEX__/images/dier.png"/>
					        				</div>
					        			</div>
					        		</div>
					        		<div class="excellent-third">
					        			<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan.png"/>
					        				<span>人事部-肖恩</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<img src="__INDEX__/images/disan.png"/>
					        				</div>
					        			</div>
					        		</div>-->
					        	</div>
			        			<ul class="mui-table-view ">
									{foreach $bumeninfo as $key=>$val}
									{if $key > 2}
									<li class="mui-table-view-cell excellent">
										<div class="excellent-left mui-pull-left">
											{if $val['zan']==1}
											<img class="dianzhan checked" src="__INDEX__/images/dianzhan2-active.png"/>
											{else}
											<img class="dianzhan" data="{$val['id']}" src="__INDEX__/images/dianzhan2.png"/>
											{/if}
											<span>{$val["departmen_name"]}-{$val["nickname"]}</span>
										</div>
										<div class="excellent-right mui-pull-right">
											<div class="mui-pull-left jifen">
												<img src="__INDEX__/images/jifen2.png"/>
												<p>{$val["integral"]}分</p>
											</div>
											<div class="mui-pull-left imgBox">
												<span>{$key+1}</span>
											</div>
										</div>
									</li>
									{/if}
									{/foreach}
									{foreach $one as $v}
									<li class="mui-table-view-cell excellent">
										<div class="excellent-left mui-pull-left">
											<!--<img class="dianzhan" data="In" src="__INDEX__/images/dianzhan2.png"/>-->
											<span>{$v['departmen_name']}-{$v["nickname"]}</span>
										</div>
										<div class="excellent-right mui-pull-right">
											<div class="mui-pull-left jifen">
												<img src="__INDEX__/images/jifen2.png"/>
												<p>{$v["integral"]}分</p>
											</div>
											<div class="mui-pull-left imgBox">
												<span>{$my}</span>
											</div>
										</div>
									</li>
									{/foreach}
					                <!--<li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan2.png"/>
					        				<span>市场部-唐四藏</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>05</span>
					        				</div>
					        			</div>
					                </li>
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan checked" src="__INDEX__/images/dianzhan2-active.png"/>
					        				<span>市场部-唐六藏1</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>06</span>
					        				</div>
					        			</div>
					                </li>
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan2.png"/>
					        				<span>市场部-唐六藏2</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>06</span>
					        				</div>
					        			</div>
					                </li>
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan2.png"/>
					        				<span>市场部-唐六藏3</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>06</span>
					        				</div>
					        			</div>
					                </li>
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan2.png"/>
					        				<span>市场部-唐六藏4</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>06</span>
					        				</div>
					        			</div>
					                </li>
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan2.png"/>
					        				<span>市场部-唐六藏5</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>06</span>
					        				</div>
					        			</div>
					                </li>
					                <li class="mui-table-view-cell excellent">
					                	<div class="excellent-left mui-pull-left">
					        				<img class="dianzhan" src="__INDEX__/images/dianzhan2.png"/>
					        				<span>市场部-唐六藏6</span>
					        			</div>
					        			<div class="excellent-right mui-pull-right">
					        				<div class="mui-pull-left jifen">
					        					<img src="__INDEX__/images/jifen2.png"/>
					        					<p>100分</p>
					        				</div>
					        				<div class="mui-pull-left imgBox">
					        					<span>06</span>
					        				</div>
					        			</div>
					                </li>-->
					            </ul>
			        		</div>
			        	</div>
			        </div>
			    </div>
			</div>
		</div>
		<div class="leavMsg" data="x">
			<span>评论</span>
		</div>
		<nav class="mui-bar mui-bar-tab footer">
	        <a class="mui-tab-item" href="javascript:;">
	            <span class="mui-iconmui-icon-home"></span>
	            <span class="mui-tab-label">首页</span>
	        </a>
	        <a class="mui-tab-item mui-active"  href="javascript:;">
	            <i class="mui-icon iconfont">&#xe7bd;</i>
	            <span class="mui-tab-label">积分榜</span>
	        </a>
	        <a class="mui-tab-item">
	            <i class="mui-icon iconfont">&#xe64e;</i>
	            <span class="mui-tab-label">平台使用</span>
	        </a>
	        <a class="mui-tab-item">
				<i class="mui-icon iconfont">&#xe649;</i>
				<span class="mui-tab-label">个人中心</span>
				{if $newsshu}
				<b class="mui-badge mui-badge-danger weidu" style="position: absolute;top:.03rem;right:.2rem">
					{$newsshu}
				</b>
				{else}
				<b class="mui-badge mui-badge-danger weidu" style="position: absolute;top:.03rem;right:.2rem;display: none">
				</b>
				{/if}
			</a>
	    </nav>
		<script src="__INDEX__/js/lib/zepto.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.view.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/lib/iscroll.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/rankings.js" type="text/javascript" charset="utf-8"></script>
		<script>
			setInterval(function(){
                var $num = parseInt(Math.random()*9)+1;
			    $.ajax({
                    async:true,
					url:"/index/Message/index"+$num,
					type:"post",
					success:function(data){
						if(data.code==200){
							if(data.data!=0){
                                $(".weidu").css("display",'block');
                                $(".weidu").text(data.data);
							}else{
                                $(".weidu").css("display",'none');
							}
						}
					}
				});
			},60000);

            $(document).on('click','.dianzhan1',function(){
                obj = $(this);
                var id = ($(this).attr('data'));
                var btnArray = ['否', '是'];
                mui.confirm('确定点赞么？', btnArray, function(e) {
                    if (e.index == 1) {
                        $.get("/index/rankings/fabulous",{id:id},function(data){
                            if(data.code==200){
                                obj.prop("class","dianzhan1 checked");
                                str = '/static/images/dianzhan2-active.png';
                                obj.prop("src",str);
                            }else{
                                layer.open({
                                    content: data.msg
                                    ,skin: 'msg'
                                    ,time: 2 //2秒后自动关闭
                                });
                            }
                        });
                    }
                })
			})
		function dianzhan2()
		{
            mui.alert("暂不支持为自己点赞");
		}
		</script>
	</body>
</html>
